Optimal. Leaf size=189 \[ \frac {2 a^2 (9 A+10 B) \sin (c+d x) \cos ^3(c+d x)}{63 d \sqrt {a \cos (c+d x)+a}}+\frac {2 a^2 (39 A+34 B) \sin (c+d x)}{45 d \sqrt {a \cos (c+d x)+a}}+\frac {2 (39 A+34 B) \sin (c+d x) (a \cos (c+d x)+a)^{3/2}}{105 d}-\frac {4 a (39 A+34 B) \sin (c+d x) \sqrt {a \cos (c+d x)+a}}{315 d}+\frac {2 a B \sin (c+d x) \cos ^3(c+d x) \sqrt {a \cos (c+d x)+a}}{9 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.45, antiderivative size = 189, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.152, Rules used = {2976, 2981, 2759, 2751, 2646} \[ \frac {2 a^2 (9 A+10 B) \sin (c+d x) \cos ^3(c+d x)}{63 d \sqrt {a \cos (c+d x)+a}}+\frac {2 a^2 (39 A+34 B) \sin (c+d x)}{45 d \sqrt {a \cos (c+d x)+a}}+\frac {2 (39 A+34 B) \sin (c+d x) (a \cos (c+d x)+a)^{3/2}}{105 d}-\frac {4 a (39 A+34 B) \sin (c+d x) \sqrt {a \cos (c+d x)+a}}{315 d}+\frac {2 a B \sin (c+d x) \cos ^3(c+d x) \sqrt {a \cos (c+d x)+a}}{9 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2646
Rule 2751
Rule 2759
Rule 2976
Rule 2981
Rubi steps
\begin {align*} \int \cos ^2(c+d x) (a+a \cos (c+d x))^{3/2} (A+B \cos (c+d x)) \, dx &=\frac {2 a B \cos ^3(c+d x) \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{9 d}+\frac {2}{9} \int \cos ^2(c+d x) \sqrt {a+a \cos (c+d x)} \left (\frac {3}{2} a (3 A+2 B)+\frac {1}{2} a (9 A+10 B) \cos (c+d x)\right ) \, dx\\ &=\frac {2 a^2 (9 A+10 B) \cos ^3(c+d x) \sin (c+d x)}{63 d \sqrt {a+a \cos (c+d x)}}+\frac {2 a B \cos ^3(c+d x) \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{9 d}+\frac {1}{21} (a (39 A+34 B)) \int \cos ^2(c+d x) \sqrt {a+a \cos (c+d x)} \, dx\\ &=\frac {2 a^2 (9 A+10 B) \cos ^3(c+d x) \sin (c+d x)}{63 d \sqrt {a+a \cos (c+d x)}}+\frac {2 a B \cos ^3(c+d x) \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{9 d}+\frac {2 (39 A+34 B) (a+a \cos (c+d x))^{3/2} \sin (c+d x)}{105 d}+\frac {1}{105} (2 (39 A+34 B)) \int \left (\frac {3 a}{2}-a \cos (c+d x)\right ) \sqrt {a+a \cos (c+d x)} \, dx\\ &=\frac {2 a^2 (9 A+10 B) \cos ^3(c+d x) \sin (c+d x)}{63 d \sqrt {a+a \cos (c+d x)}}-\frac {4 a (39 A+34 B) \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{315 d}+\frac {2 a B \cos ^3(c+d x) \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{9 d}+\frac {2 (39 A+34 B) (a+a \cos (c+d x))^{3/2} \sin (c+d x)}{105 d}+\frac {1}{45} (a (39 A+34 B)) \int \sqrt {a+a \cos (c+d x)} \, dx\\ &=\frac {2 a^2 (39 A+34 B) \sin (c+d x)}{45 d \sqrt {a+a \cos (c+d x)}}+\frac {2 a^2 (9 A+10 B) \cos ^3(c+d x) \sin (c+d x)}{63 d \sqrt {a+a \cos (c+d x)}}-\frac {4 a (39 A+34 B) \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{315 d}+\frac {2 a B \cos ^3(c+d x) \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{9 d}+\frac {2 (39 A+34 B) (a+a \cos (c+d x))^{3/2} \sin (c+d x)}{105 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.60, size = 103, normalized size = 0.54 \[ \frac {a \tan \left (\frac {1}{2} (c+d x)\right ) \sqrt {a (\cos (c+d x)+1)} (2 (759 A+799 B) \cos (c+d x)+(468 A+548 B) \cos (2 (c+d x))+90 A \cos (3 (c+d x))+2964 A+170 B \cos (3 (c+d x))+35 B \cos (4 (c+d x))+2689 B)}{1260 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.59, size = 107, normalized size = 0.57 \[ \frac {2 \, {\left (35 \, B a \cos \left (d x + c\right )^{4} + 5 \, {\left (9 \, A + 17 \, B\right )} a \cos \left (d x + c\right )^{3} + 3 \, {\left (39 \, A + 34 \, B\right )} a \cos \left (d x + c\right )^{2} + 4 \, {\left (39 \, A + 34 \, B\right )} a \cos \left (d x + c\right ) + 8 \, {\left (39 \, A + 34 \, B\right )} a\right )} \sqrt {a \cos \left (d x + c\right ) + a} \sin \left (d x + c\right )}{315 \, {\left (d \cos \left (d x + c\right ) + d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.84, size = 245, normalized size = 1.30 \[ \frac {1}{2520} \, \sqrt {2} {\left (\frac {35 \, B a \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right )}{d} + \frac {45 \, {\left (2 \, A a \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) + 3 \, B a \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )\right )} \sin \left (\frac {7}{2} \, d x + \frac {7}{2} \, c\right )}{d} + \frac {378 \, {\left (A a \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) + B a \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )\right )} \sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right )}{d} + \frac {1050 \, {\left (A a \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) + B a \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )\right )} \sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right )}{d} + \frac {630 \, {\left (3 \, A a \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) + 4 \, B a \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )\right )} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{d} + \frac {1260 \, {\left (2 \, A a \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) + B a \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )\right )} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{d}\right )} \sqrt {a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.42, size = 123, normalized size = 0.65 \[ \frac {4 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) a^{2} \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (280 B \left (\sin ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (-180 A -900 B \right ) \left (\sin ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (504 A +1134 B \right ) \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (-525 A -735 B \right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+315 A +315 B \right ) \sqrt {2}}{315 \sqrt {a \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.79, size = 154, normalized size = 0.81 \[ \frac {6 \, {\left (15 \, \sqrt {2} a \sin \left (\frac {7}{2} \, d x + \frac {7}{2} \, c\right ) + 63 \, \sqrt {2} a \sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ) + 175 \, \sqrt {2} a \sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ) + 735 \, \sqrt {2} a \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} A \sqrt {a} + {\left (35 \, \sqrt {2} a \sin \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ) + 135 \, \sqrt {2} a \sin \left (\frac {7}{2} \, d x + \frac {7}{2} \, c\right ) + 378 \, \sqrt {2} a \sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ) + 1050 \, \sqrt {2} a \sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ) + 3780 \, \sqrt {2} a \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} B \sqrt {a}}{2520 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int {\cos \left (c+d\,x\right )}^2\,\left (A+B\,\cos \left (c+d\,x\right )\right )\,{\left (a+a\,\cos \left (c+d\,x\right )\right )}^{3/2} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________